Skip to content

Instantly share code, notes, and snippets.

Ghostty Keyboard Shortcuts

Default keyboard shortcuts for Ghostty terminal emulator. Platform-specific differences are noted where applicable.

Window Management

Action Windows/Linux macOS
New window Ctrl+Shift+N Cmd+N
Close window Alt+F4 Cmd+Shift+W
@BeadtMODE
BeadtMODE / .deps...npm...@openzeppelin...contracts...access...AccessControl.sol
Created March 9, 2026 09:15
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.34+commit.80d5c536.js&optimize=undefined&runs=200&gist=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (access/AccessControl.sol)
pragma solidity ^0.8.20;
import {IAccessControl} from "./IAccessControl.sol";
import {Context} from "../utils/Context.sol";
import {IERC165, ERC165} from "../utils/introspection/ERC165.sol";
/**

配置步骤:

# 1. 安装 acpx 插件
openclaw plugins install @openclaw/acpx

# 2. 配置 OpenClaw(.OPENCLAW 是你的 config 目录)
openclaw config set plugins.entries.acpx.enabled true
openclaw config set plugins.entries.acpx.config.permissionMode approve-all
openclaw config set acp.enabled true
@figassis
figassis / randomusphones.json
Created December 2, 2018 13:58
1000 valid us phone numbers for testing
["+1-418-543-8090","+1-587-530-2271","+1-404-724-1937","+1-443-307-1473","+1-329-420-1792","+1-770-212-6011","+1-473-522-7496","+1-477-962-3907","+1-478-797-3175","+1-948-914-6246","+1-268-763-5180","+1-369-441-8619","+1-501-926-2756","+1-223-919-0967","+1-328-857-2537","+1-636-613-5429","+1-547-538-9848","+1-523-317-7761","+1-557-680-6290","+1-905-546-5021","+1-975-999-8212","+1-358-342-3321","+1-669-937-7112","+1-506-676-9834","+1-510-518-1673","+1-282-995-0297","+1-667-407-8456","+1-396-518-2124","+1-528-705-6591","+1-395-288-8024","+1-390-949-5954","+1-437-295-3568","+1-227-799-6356","+1-703-363-8155","+1-618-720-3464","+1-557-394-8274","+1-237-257-1580","+1-623-416-0089","+1-533-762-6549","+1-299-471-0213","+1-790-548-2248","+1-469-253-5139","+1-580-303-6087","+1-507-639-8400","+1-269-771-0214","+1-645-818-7021","+1-436-974-4859","+1-952-660-7350","+1-493-885-4329","+1-697-392-0705","+1-744-865-4521","+1-887-526-1105","+1-816-630-9743","+1-496-717-7301","+1-212-475-2813","+1-222-993-6707","+1-868-574-867
@torarnv
torarnv / gist:4967079
Last active March 9, 2026 09:14
Availability macros (Availability.h AvailabilityMacros.h AvailabilityInternal.h) notes
MACOSX_DEPLOYMENT_TARGET environment variable or -mmacosx-min-version= on the command line
results in the define __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ being set, which is
then picked up by AvailabilityMacros.h and Availability(Internal).h
The result is MAC_OS_X_VERSION_MIN_REQUIRED being set (AvailabilityMacros.h)
and __MAC_OS_X_VERSION_MIN_REQUIRED (Availability.h)
The same goes for MAC_OS_X_VERSION_MAX_ALLOWED (AvailabilityMacros.h) and
and __MAC_OS_X_VERSION_MAX_ALLOWED (Availability.h), which is set to the
SDK version (unless set, for example to fake/check what happens when building
#!/usr/bin/env bun
"use strict";
const fs = require("fs");
const { execSync } = require("child_process");
const path = require("path");
// ANSI color constants
const c = {
cy: '\033[36m', // cyan
@MrOtherGuy
MrOtherGuy / fx-css-variables.txt
Last active March 9, 2026 09:11
CSS variables used by Firefox
main-window
***********************
--arrowpanel-background
--arrowpanel-border-color
--arrowpanel-color
--arrowpanel-dimmed
--arrowpanel-dimmed-even-further
--arrowpanel-dimmed-further
--arrowpanel-padding
--autocomplete-popup-background
@rob-hills
rob-hills / ubuntu-22.04-mbp-a1707.md
Last active March 9, 2026 09:08
Ubuntu 22.04 on MacBook Pro 2017 (A1707, MBP 14,3)

Summary

Random set of notes and links that have helped me in the saga to get Ubuntu 22.04 up and running on my 2017 MacBook Pro These notes are mainly for myself in the event that I have to do this again some day. But if you find them helpful, that's great.

Important update

Unfortunately the MacBookPro that I bought second hand turned out to be a dud with some serious hardware flaws that didn't show up until a couple of months after I'd bought it.

I've since purhcased another laptop so I'm not going to be able to maintain this GIST.

I'll leave it here for now in case others want to contribute updates, or clone it. If you feel it's out of date or misleading or a waste of time, let me know in the comments and I'll remove it.

"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@dlech
dlech / badgemagic.py
Last active March 9, 2026 09:05
Python script to program Fossia BadgeMagic using Bluetooth.
# SPDX-License-Identifier: MIT
# Copyright (c) 2025 David Lechner <dlechner@baylibre.com>
#
# /// script
# dependencies = [
# "bleak",
# ]
# ///
"""